﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Tsual.DataPipeline
{
    [FastConfigurationPipe]
    public class DataPipeline<T, TMeta, TPipe0> : DataPipeline<T, TMeta>
            where TPipe0 : class, IDataPipeDescription<T, TMeta>
    {
        public DataPipeline(Func<Type, object> serviceResolveFunction) : base(serviceResolveFunction)
        {
            AddPipe<TPipe0>();
        }
    }
    /// <summary>
    /// Warninig: complex generic type
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <typeparam name="TMeta"></typeparam>
    /// <typeparam name="TPipe0"></typeparam>
    /// <typeparam name="TPipe1"></typeparam>
    [FastConfigurationPipe]
    public class DataPipeline<T, TMeta, TPipe0, TPipe1> : DataPipeline<T, TMeta>
        where TPipe0 : class, IDataPipeDescription<T, TMeta>
        where TPipe1 : class, IDataPipeDescription<T, TMeta>
    {
        public DataPipeline(Func<Type, object> serviceResolveFunction) : base(serviceResolveFunction)
        {
            AddPipe<TPipe0>().AddPipe<TPipe1>();
        }
    }
    /// <summary>
    /// Warninig: complex generic type
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <typeparam name="TMeta"></typeparam>
    /// <typeparam name="TPipe0"></typeparam>
    /// <typeparam name="TPipe1"></typeparam>
    /// <typeparam name="TPipe2"></typeparam>
    [FastConfigurationPipe]
    public class DataPipeline<T, TMeta, TPipe0, TPipe1, TPipe2> : DataPipeline<T, TMeta>
        where TPipe0 : class, IDataPipeDescription<T, TMeta>
        where TPipe1 : class, IDataPipeDescription<T, TMeta>
        where TPipe2 : class, IDataPipeDescription<T, TMeta>
    {
        public DataPipeline(Func<Type, object> serviceResolveFunction) : base(serviceResolveFunction)
        {
            AddPipe<TPipe0>().AddPipe<TPipe1>().AddPipe<TPipe2>();
        }
    }
    /// <summary>
    /// Warninig: complex generic type
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <typeparam name="TMeta"></typeparam>
    /// <typeparam name="TPipe0"></typeparam>
    /// <typeparam name="TPipe1"></typeparam>
    /// <typeparam name="TPipe2"></typeparam>
    /// <typeparam name="TPipe3"></typeparam>
    [FastConfigurationPipe]
    public class DataPipeline<T, TMeta, TPipe0, TPipe1, TPipe2,TPipe3> : DataPipeline<T, TMeta>
        where TPipe0 : class, IDataPipeDescription<T, TMeta>
        where TPipe1 : class, IDataPipeDescription<T, TMeta>
        where TPipe2 : class, IDataPipeDescription<T, TMeta>
        where TPipe3 : class, IDataPipeDescription<T, TMeta>
    {
        public DataPipeline(Func<Type, object> serviceResolveFunction) : base(serviceResolveFunction)
        {
            AddPipe<TPipe0>().AddPipe<TPipe1>().AddPipe<TPipe2>().AddPipe<TPipe3>();
        }
    }
}
